// 获取url中的参数 hash模式下
export function formatUrlParams() {
    let url = window.location.hash
    let obj = {}
    if (url.indexOf('?') !== -1) {
        let startIndex = url.indexOf('?') + 1
        let str = url.substr(startIndex)
        let strs = str.split('&')
        for (let i = 0; i < strs.length; i++) {
            obj[strs[i].split('=')[0]] = strs[i].split('=')[1]
        }
        return obj
    }
}
